function* num(e) {
    var i = 0;
    if('number'!==typeof e)
    {
        e = 0 ;
    }
    while(i<e)
    {
        i++;
        yield i;
    }
}
var t = 0 ;
for(t of num(5) ) console.log(t);
